home *** CD-ROM | disk | FTP | other *** search
/ Danny Amor's Online Library / Danny Amor's Online Library - Volume 1.iso / html / faqs / faq / inn-faq / part3 < prev    next >
Encoding:
Text File  |  1995-07-25  |  36.9 KB  |  1,039 lines

  1. Subject: INN FAQ Part 3/4: Operational and Misc. Questions
  2. Newsgroups: news.software.nntp,news.software.b,news.answers
  3. From: tal@Warren.MENTORG.COM (Tom Limoncelli)
  4. Date: 20 Aug 1994 04:00:20 -0000
  5.  
  6. Posted-By: auto-faq 2.4
  7. Archive-name: inn-faq/part3
  8.  
  9. Last Changed: $Id: FAQ-inn.3,v 1.79 1994/07/25 14:35:37 tal Exp $
  10.  
  11.                   Part 3 of 4
  12.  
  13. INN FAQ Part 1/4: General Information
  14. INN FAQ Part 2/4: Debugging Guide & Tutorial
  15. INN FAQ Part 3/4: Operational and Misc. Questions
  16.                     Day-to-day operational questions
  17.                     INN is running, but i have this small problem...
  18.                     How do i... (Big changes you can make to the system)
  19.                     Bugs in INN 1.5:
  20.                     Bugs in INN 1.4:
  21.                     Bugs in INN 1.3:
  22.                     Bugs in INN 1.2:
  23. INN FAQ Part 4/4: Appendix A: Norman's install guide
  24.  
  25.  
  26. ------------------------------
  27.  
  28. Subject:  Table Of Contents for Part 3/4
  29.  
  30. =====================================================================
  31.   TABLE OF CONTENTS FOR PART 3/4:  Operational and Misc. Questions
  32. =====================================================================
  33.  
  34. DAY-TO-DAY OPERATIONAL QUESTIONS:
  35.     How do I create all those directories in the newsspool?
  36.     Safe way to edit the "active" file?
  37.     What's the best way to upgrade to a new version of INN?
  38.     How do I talk to innd from C or Perl?
  39.     After a crash.
  40. Subject:  Listing every article
  41. INN IS RUNNING, BUT I HAVE THIS SMALL PROBLEM...:
  42.     Suddenly my active and history files are owned by root!
  43.     How come my host name comes out twice in the Path line?
  44.     Expire had problems last night, and while I fixed the problem,
  45.     expire reports "Group not matched (removed?) --
  46.         Using default expiration"
  47.     Why doesn't this newsfeeds entry do what I want?
  48.     Why am I forwarding cancel messages for articles in comp.foo
  49.     Debugging someone that is feeding you.
  50.     Feeds suddenly can't connect anymore!
  51.     I'm getting groups sent to me that I don't want.
  52.     When my feeder connects, I get articles but they don't take
  53.         what's waiting for them.
  54.     Directories are being created with wrong permissions.
  55.     Why am I getting alt.sex.pictures even though I have
  56.     More about the "to.*" groups
  57.     What's a decent syslog.conf configuration?
  58.     INN batcher writing "#!rnews 0" separators
  59.     Posting while throttled doesn't work
  60.     "innd: overview! spooling" and the file "overview!" in /usr/spool/news/out.going
  61.     "newgroup" control messages aren't being executed
  62. HOW DO I... (Big changes you can make to the system):
  63.     How do I set up a delayed IHAVE/SENDME over NNTP?
  64.     Can I use gzip with INN?
  65.     What do I do if /var/spool/news is set up over many partitions?
  66.     Archiving expired articles
  67.     INN on one machine, UUCP modem on a different one
  68. BUGS IN 1.4:
  69.     Security Patch
  70.     Looping Select Patch
  71. BUGS IN 1.3:
  72.     7-bit encoded batches are not correctly processed. Why is this?
  73.     NOV (overchan) doesn't work well.
  74. BUGS IN 1.2:
  75.     Why doesn't nntpget work?
  76.  
  77.  
  78. =====================================================================
  79.                   DAY-TO-DAY OPERATIONAL QUESTIONS
  80. =====================================================================
  81.  
  82.  
  83. ------------------------------
  84.  
  85. Subject:  How do I create all those directories in the newsspool?
  86.  
  87. Q:  For example, if you receive comp.sys.amiga.applications, do you
  88. have to mkdir /var/spool/news/comp/sys/amiga/applications?
  89.  
  90. A:  Nope.  innd creates the directory for you the first time you
  91. receive an article for that newsgroup.
  92.  
  93.  
  94. ------------------------------
  95.  
  96. Subject:  Safe way to edit the "active" file?
  97.  
  98. First of all, you could manipulate the active file using the ctlinnd
  99. "newgroup", "rmgroup" and "changegroup" commands.  However, sometimes
  100. you just need to do a lot of editing all at once:
  101.  
  102. The following sequence is the shortest:
  103.  
  104.     ctlinnd pause "edit active"
  105.     [do something to the active file]
  106.     ctlinnd reload active "edit active"
  107.     ctlinnd go "edit active"
  108.  
  109. Simple!  No need to "flush" since the "pause" does that.
  110.  
  111. > What if I need to delete 3000 lines from my active file?
  112.  
  113. I would definately edit the active file manually (using
  114. the above procedure).
  115.  
  116. > What if I need to delete 10 lines from my active file?
  117.  
  118. For a couple quick changes, I recommend using "ctlinnd".  This is a
  119. little slow because all channels are closed and reopened after each
  120. "rmgroup", "newgroup", and "changegroup".  However, it's easier than
  121. remembering the above sequence.
  122.  
  123. DO NOT THROTTLE THE SERVER WHEN DOING MULTIPLE rmgroup COMMANDS.  There
  124. is a bug in INN (all versions) that will shred your active file if you
  125. do multiple "rmgroup" messages while the server if throttled.  This is
  126. a common mistake.  People think the "rmgroup"'s will go faster if the
  127. server is throttled.  It will go faster, it will also shred your active
  128. file.
  129.  
  130. If you have a large number of groups to remove or create, you can use
  131. awk to write a script to do the work for you.
  132.  
  133.     % cat thelist
  134.     alt.foo.bar
  135.     alt.delete.me
  136.     comp.sys.mac
  137.     % awk <thelist '{ print "ctlinnd rmgroup " $1 }'
  138.     ctlinnd rmgroup alt.foo.bar
  139.     ctlinnd rmgroup alt.delete.me
  140.     ctlinnd rmgroup comp.sys.mac
  141.  
  142. Now, you can either send the output of that to "| sh -x",
  143. or you can redirect the output to a file, and "source" the
  144. file.
  145.  
  146. If you want to create a bunch of newsgroups, the awk
  147. command might be like this:
  148.  
  149.     % awk <thelist \
  150.     '{ print "ctlinnd newgroup " $1 " y user@host" }' | sh -x
  151.  
  152.  
  153. ------------------------------
  154.  
  155. Subject:  What's the best way to upgrade to a new version of INN?
  156.  
  157. First, you should read the README and the Install.ms (yes, read
  158. them both... again).   Things change in new versions.
  159.  
  160. Second, the README explains how to do an upgrade.  This document
  161. is redundent, but explains the procedure in more detail.
  162.  
  163. STEP 1:  Copy the values in the old config.data to your new config.data.
  164. You can do this automaticly with this trick:
  165.  
  166.     % cd config
  167.     % make subst
  168.     % cp config.dist config.data
  169.     % ./subst -f {OLDFILE} config.data
  170. where "{OLDFILE}" names your old config.data file.
  171.  
  172. STEP 2:  Edit the config.data to see if you want to change any of
  173. the new settings that didn't exist in the old version's config.data
  174. file.
  175.  
  176. STEP 3: Compile everything:
  177.  
  178.     % cd $INN
  179.     % make world
  180.  
  181. STEP 4: When you feel you are ready to install the new files shut the old daemon:
  182.  
  183.     % ctlinnd shutdown 'upgrade in progress'
  184.     [ kill innwatch by hand if you need to ]
  185.  
  186. STEP 4: Install the new files:
  187.  
  188.     % cd $INN
  189.     % make update
  190.  
  191. STEP 5: Now update all your $INN/site files to be the same as they were
  192. for your old software.  "cd $INN/site ; make diff-installed" will tell
  193. you what's different between the files in /usr/lib/news and $INN/site.
  194. If you only make changes in the $INN/site directory and use "make
  195. install" to copy them into place you'll save your self a lot of
  196. trouble.  Read $INN/site/Makefile for more interesting things that
  197. "make" can do.
  198.  
  199. STEP 6: When you feel you are ready to install the new $INN/site files:
  200.  
  201.     # cd $INN/site
  202.     # make install
  203.  
  204. STEP 7: Re-start the system:
  205.  
  206.     % sh /usr/lib/news/etc/rc.news
  207.  
  208. STEP 8: If everything was done right you should be up and running.
  209. Part 2 of the FAQ gives tips on testing your configuration.
  210.  
  211.  
  212. ------------------------------
  213.  
  214. Subject:  How do I talk to innd from C or Perl?
  215.  
  216. Rich Salz says:
  217.  
  218. If you are writing C, look at doc/inndcomm.3 and include/inndcomm.h;
  219. they include all you need to do any ctlinnd command (in fact, ctlinnd
  220. itself is little more than a call to the library).
  221.  
  222. Hacking up a Perl subroutine that spoke to innd's Unix-domain control
  223. socket should be fairly straightforward but hasn't yet been written.
  224.  
  225.  
  226. ------------------------------
  227.  
  228. Subject:  After a crash.
  229.  
  230. "What do I do after a system crash?"
  231.  
  232. INN handles crashes pretty well.  If there are any problems they
  233. get cleaned up by the nightly expire.  About once a month you
  234. might want to run "makehistory -buv" to look for "lost" articles.
  235. Check the man page for "makehistory" for more information.
  236.  
  237.  
  238. ------------------------------
  239.  
  240. Subject:  Listing every article
  241.  
  242. People often ask for a way to list every file in the newsspool.  There
  243. are a couple ways of doing this.  They work well for INN as well as C
  244. News:
  245.  
  246. 1. Here's the fastest way.  However, it only lists the files that are
  247. actually in the history file and if an article is crossposted it only
  248. gets listed once:
  249.  
  250. #!/bin/sh
  251. . /usr/lib/news/innshellvars
  252. cd ${SPOOL}
  253. awk '(NF > 2){print $3}' < ${HISTORY} | tr . /
  254.  
  255. Sorting the output will improve directory cache efficiency.
  256.  
  257. 2. This lists any article file no matter how many links
  258. you have, etc. and even if it is not listed in the history
  259. file:
  260.  
  261.     cd /var/spool/news
  262.     gfind . -regex '.*/[0-9][0-9]*$' -print
  263.  
  264. 3. find2perl will output a script that you can modify to do some fancy
  265. things.  For example, this command:
  266.  
  267.     find2perl . -mtime +30 -name '[0-9][0-9]*$' -exec '/bin/rm {}'
  268.  
  269. outputs a perl script that deletes any article that is over 30 days old
  270. (except the regular expression is output as wrong...  change it to:
  271.  
  272.     /^[0-9]+$/ &&
  273.  
  274. and it should work just fine.
  275.  
  276.  
  277. =====================================================================
  278.           INN IS RUNNING, BUT I HAVE THIS SMALL PROBLEM...
  279. =====================================================================
  280.  
  281. ------------------------------
  282.  
  283. Subject:  Suddenly my active and history files are owned by root!
  284.  
  285. rc.news runs from root.  After that, everything else should run as
  286. news.  It sounds like you've run news.daily as root by mistake.  Make
  287. sure all your cron jobs run as news and you'll be fine.
  288.  
  289. If you have an old "cron" system, you might consider replacing yours
  290. with one of the many public domain replacements.  If you can't create
  291. a different "crontab" for each user, the idiom is:
  292.  
  293. 0 * * * * * su news -c '/do/this/as/news'
  294.  
  295.  
  296. ------------------------------
  297.  
  298. Subject:  How come my host name comes out twice in the Path line?
  299.  
  300. The INN server puts its name in the Path line of every article that it
  301. receives.  Obviously, it has to do this.  The default configuration has
  302. inews put the local host in the Path header.  If nobody posts on the
  303. server and you use fully-qualified domain names on your workstations,
  304. then everything works the right way.  (If `hostname` doesn't give an
  305. FQDN on your machine, you can work-around this by setting the "domain"
  306. value in inn.conf; remember that innd never re-reads inn.conf.  You
  307. must "ctlinnd shutdown x" and then re-start the server).  Many people
  308. don't want the client machines to put their name in the Path header.
  309. To do this, set INEWS_PATH to DONT.  Finally, let me say that it is
  310. probably a mistake to have a "pathhost" line on any machine other than
  311. your server if you set INEWS_PATH to DO.  If you doubt this, please
  312. trace the article flow for yourself.  If you are curious about the
  313. effect of INEWS_PATH, read the nroff source -- not the formatted
  314. output -- of doc/inews.1
  315.  
  316.  
  317. ------------------------------
  318.  
  319. Subject:  Expire had problems last night, and while I fixed the
  320.             problem, it still won't run.
  321.  
  322. When expire starts up it "reserves" the server so that nobody else can
  323. pause or throttle it.  This prevents anyone else from coming in and
  324. modifying the history database.  If expire bails out because of a bad
  325. error (e.g., your expire.ctl has syntax errors) it leaves the server
  326. reserved so that no maintenance will be done until a good expire run has
  327. occurred.  To unblock the server, use the ctlinnd "reserve" command with
  328. an empty string argument.
  329.  
  330.  
  331. ------------------------------
  332.  
  333. Subject: expire reports "Group not matched (removed?) --
  334.         Using default expiration"
  335.  
  336. Expire says:
  337. Group not matched (removed?) alt.techno-shamanism -- Using default expiration
  338. Group not matched (removed?) misc.computers.forsale -- Using default expiration
  339. Group not matched (removed?) de.rec.sf.startrek -- Using default expiration
  340.  
  341. That just means that you've removed those newsgroups groups and expire
  342. is slowly removing articles from the spool as they expire.  Eventually
  343. the articles will all have been deleted and so will these messages.
  344.  
  345.  
  346. ------------------------------
  347.  
  348. Subject:  Why doesn't this newsfeeds entry do what I want?
  349.             "foo.com:alt,!alt.sex"
  350.  
  351. A newsfeeds entry is not a sys file (C News) entry.  Please read
  352. newsfeeds.5.  You might also find the sys2nf program in the frontends
  353. directory useful, as well as the inncheck Perl script that is found in
  354. the samples directory.  The INN Configuration FAQ has cook-book
  355. examples of the steps required to install a NNTP feed, UUCP feed, and
  356. NNTP via nntplink feed.
  357.  
  358.  
  359. ------------------------------
  360.  
  361. Subject:  Why am I forwarding cancel messages for articles in comp.foo
  362.             when I explicitly have !comp.foo in the newsfeeds entry?
  363.  
  364. Control messages can be explicitly forwarded, so a control message to
  365. comp.foo is forwarded to sites that recieve either comp.foo or control.
  366. Please see the "Control Messages" section of innd.8.  As that
  367. documentation says, you probably want to put "!control" in the
  368. subscription list for most of your newsfeeds.
  369.  
  370.  
  371. ------------------------------
  372.  
  373. Subject:  Debugging someone that is feeding you.
  374.  
  375. David Myers <dem@meaddata.com> suggests that if a neighbor complains
  376. that their feed to you doesn't work: (1) make sure they've read the man
  377. pages, and (2) have them send a copy of their newsfeeds file.
  378.  
  379. Truly sage advice!
  380.  
  381.  
  382. ------------------------------
  383.  
  384. Subject:  Feeds suddenly can't connect anymore!
  385.  
  386. Q:  How come feeds tell me they can't connect to me any more?
  387.  
  388. A:  When innd starts up it reads the hosts.nntp file and looks up the
  389. IP addresses for all the entries mentioned there.  The problem is that
  390. this data is dynamic (sometimes people change IP addresses), and innd
  391. never goes back to check.  If your system stays up for days and one of
  392. your feeds changes their IP address (or has a new CNAME), innd will
  393. reject them.  Rich plans to handle this in INN1.5, but for now you
  394. might find it useful to do a "ctlinnd reload hosts.nntp" out of cron
  395. every day or so or when you notice there's a problem.
  396.  
  397. Here is a sample crontab entry to use: (news should run this)
  398.  
  399. 55 7,12,17,22 * * * /usr/local/newsbin/ctlinnd -s reload hosts.nntp crontab
  400.  
  401. I hope people vary the time this runs.  If a huge number of INN hosts,
  402. many running NTP so their clocks are within a few ms., all kick off DNS
  403. lookups at exactly the same time, the internet traffic could get
  404. "interesting".  Try setting the minutes value to the time you added
  405. this entry to crontab rather than everyone using "55".  In fact, if
  406. everyone used their birthday plus 1 if they are born on an odd month,
  407. that would spread it out just fine.
  408.  
  409.  
  410. ------------------------------
  411.  
  412. Subject:  I'm getting groups sent to me that I don't want.
  413.  
  414. Tell the system administrator(s) of the machine(s) that feed news to
  415. you to stop sending those groups.  There is no other way to do it.  (In
  416. B or C News, the groups would end up in junk; at least with INN they
  417. are not taking up space.  You should compile with WANT_JUNK set to
  418. DONT).
  419.  
  420. If the people that feed you use B news or C news, remember that they
  421. don't use a "newsfeeds" file.  They use a file called "sys" which has a
  422. completely different format for specifying newsgroups.
  423.  
  424.  
  425. ------------------------------
  426.  
  427. Subject:  When my feeder connects, I get articles but they don't take what's waiting for them.
  428.  
  429. I hate to say this, but this really shows that you haven't RTFMed very
  430. much.
  431.  
  432. News is not automaticly bidirectional (it's like SMTP, not UUCP).  If
  433. you want to send things out you will have to make sure that you run
  434. send-nntp or nntpsend from cron.  nntpsend is easier and elsewhere in
  435. this document there are cookbook examples of what to add every time you
  436. set up a new feed.
  437.  
  438.  
  439. ------------------------------
  440.  
  441. Subject:  Directories are being created with wrong permissions.
  442.  
  443. > Question:
  444. >When I received news for /var/spool/news/foo/bar for the first
  445. >time, the directories got created:
  446. >
  447. ># ls -lgR foo
  448. >total 1
  449. >d-wx-w-rwx  2 news     news          512 Feb  9 00:03 bar/
  450. >
  451. >What did I do wrong?
  452. >
  453. >##  Mode that directories are created under.
  454. >#### =()<GROUPDIR_MODE          @<GROUPDIR_MODE>@>()=
  455. >GROUPDIR_MODE           2775
  456.  
  457.   Answer:
  458. You forgot a zero in front of this number, for the C compiler to interpret it
  459. as octal instead of decimal.
  460.  
  461.  
  462. ------------------------------
  463.  
  464. Subject:  Why am I getting alt.sex.pictures even though I have
  465.             "ME:!alt.sex.pictures" in my newsfeeds file?
  466.  
  467. The active file is the definitive list of what newsgroups you receive.
  468. INN's ME entry is different from C News and B News; please see
  469. newsfeeds.5.  If you do not want to receive alt.sex.pictures, ask the
  470. system(s) that send you news not to send it to you.  (You would have to do
  471. that no matter what news system you are running.)
  472.  
  473.  
  474. ------------------------------
  475.  
  476. Subject:  More about the "to.*" groups
  477.  
  478. (Thanks to jmalcolm@sura.net (Joseph Malcolm) for supplying
  479. these answers.)
  480.  
  481. >1) Why did my local INN act on the sendsys posted to to.neighbor?
  482.  
  483. to.* groups aren't magic to INN.  Your system received the message,
  484. it acted on it.
  485.  
  486. >2) Why did my neighbor send the cmsg to all of his neighbors?
  487.  
  488. See 3.
  489.  
  490. >3) Is is related to having the "control" group in our newsgroups patterns?
  491.  
  492. Yes.
  493.  
  494. >   The INN docs say you probably don't want to do this, but they don't say
  495. >   why.
  496.  
  497. Actually, they do. This is from innd(8):
  498.  
  499.     Sites may explicitly have the ``control'' newsgroup in their
  500.     subscription  list,  although  it is usually best to exclude
  501.     it.  If a control message is posted to a  group  whose  name
  502.     ends  with  the  four characters ``.ctl'' then the suffix is
  503.     stripped off and what is left is used  as  the  group  name.
  504.     For  example,  a cancel message posted to ``news.admin.misc.ctl''
  505.     will be sent to all sites that subscribe to  ``control''  or
  506.     ``news.admin.misc''.
  507.  
  508. There is also a pointer to this in newsfeeds(5).
  509.  
  510. >   But I still need it in my active file, right?
  511.  
  512. Yes.
  513.  
  514.  
  515. ------------------------------
  516.  
  517. Subject:  What's a decent syslog.conf configuration?
  518.  
  519. The configuration will be different for each site, but here is what
  520. Greg Earle recommends as the lines for the "news.*" related part.
  521. Remember that most syslog's require tabs, not spaces.
  522.  
  523. Greg's canonical SunOS 4.1.x INN-related syslog.conf entries (which can
  524. be merged into your current configuration):
  525.  
  526. #
  527. # INN stuff
  528. #
  529. ##  Send critical messages to everyone who is logged in and to the console.
  530. news.crit               *
  531. news.crit               /dev/console
  532.  
  533. ##  Log news messages to separate files.
  534. ##  Note that each level includes all of the above it.
  535. ## =()<news.crit        @<_PATH_MOST_LOGS>@/news.crit>()=
  536. news.crit               /var/log/news/news.crit
  537. ## =()<news.err         @<_PATH_MOST_LOGS>@/news.err>()=
  538. news.err                /var/log/news/news.err
  539. ## =()<news.notice      @<_PATH_MOST_LOGS>@/news.notice>()=
  540. news.notice             /var/log/news/news.notice
  541.  
  542.  
  543. ------------------------------
  544.  
  545. Subject:  INN batcher writing "#!rnews 0" separators
  546.  
  547. >Outgoing UUCP batches from here are going out with "#!rnews 0" at
  548. >the head of each article.
  549.  
  550. Most common cause:  your newsfeeds entry has "Wnm" not "Wnb".
  551.  
  552. Other reasons:
  553.  
  554. batchfiles have something other than a single space between article
  555. filename and size
  556.  
  557. batchfiles lack size information (all the articles sizes will be read
  558. from the batch file as zero)
  559.  
  560.  
  561. ------------------------------
  562.  
  563. Subject:  Posting while throttled doesn't work
  564.  
  565. >I want to be able to allow my users to be able to post articles when
  566. >innwatch has throttled the system when the spool disk is "full".
  567.  
  568. Cannot be done in 1.4.
  569.  
  570. At a minimum, in 1.5 nnrpd will spool the post for the user.
  571.  
  572.  
  573. ------------------------------
  574.  
  575. Subject:  "innd: overview! spooling" and the file "overview!" in /usr/spool/news/out.going
  576.  
  577. > About once a month or so, I get the following warning messages:
  578. > Jan 20 07:20:22 optima innd: overview!:31:proc:9193 cant flush count 14639 Operation would block
  579. > Jan 20 07:20:22 optima innd: overview! spooling 14639 bytes
  580. > And there's a file "overview!" in /usr/spool/news/out.going with stuff in it.
  581. > Should I be doing anything more with this than ignoring it, and maybe
  582. > occasionally deleting it (it just grows)?
  583.  
  584. This happens because innd is feeding info to overchan faster than
  585. overchan can process it.  The overflow is sent to the file
  586. "overview!".  This file can be deleted, as nnrpd will grab the missing
  587. data out of the articles "manually".  The slow-down won't be noticed.
  588. However, you can "expireover -a" to "fill in the holes".
  589.  
  590. To prevent this in the future, you need to make overchan run faster.
  591. This is easy to do.  I found that moving the overview files into
  592. /usr/spool/news/over.view made things fast enough that the problem went
  593. away.  Change "_PATH_OVERVIEWDIR" in config.data, recompile, and you're
  594. done.  (You will need to recompile any newsreaders that read via NFS or
  595. off the local disk).
  596.  
  597. Why does that speed up overchan?  overchan works by opening the proper
  598. .overview file, appending 1 line to it, then closing the file.  If you
  599. have the .overview file in the same directory as 10000 articles then
  600. opening the .overview file will take a huge amount of time.  The open()
  601. call literally searches though an average 5000 (half of 10000) file
  602. names to find ".overview".  If you move your .overview files so that
  603. each one is in it's own directory, (say,
  604. /usr/spool/news/over.view/{group}/{name}/.overview) then open() is
  605. searching through 3 files ( ".", "..", and ".overview") to find 1
  606. file.  ( O(N/2) where N=10000 vs.  N=3... and you thought those
  607. freshman year CS classes would never be useful!)
  608.  
  609. There isn't much you can do to make the "append" and "close" steps much
  610. faster, except maybe install a PrestoServe or similar write-cache, and
  611. that won't help very much.
  612.  
  613. Profiling overchan (with PureSoft's Quantify product) found that the
  614. open() (actually searching the directory to find the .overview file)
  615. was around 80% of the execution time of overchan.  That was reduced to
  616. 40% when I moved the .overview files to their own directory.  With the
  617. change, overview's profiling statistics are pretty flat. (which is
  618. good).
  619.  
  620. DO run "expireover -a" to fix the problem.
  621.  
  622. DO NOT try feeding the "overview!" file to overchan manually.
  623.     (1) overchan doesn't do any locking and you'll have two overchan's
  624.         running at once.
  625.     (2) overchan only appends to the .overview files.  If you've gotten
  626.         any articles since the "overview!" file was created (you will
  627.         have) then you'll be appending told old entries that are out of
  628.         order.  Your ".overview" files must be in sorted order for the
  629.         other utilities to work right.
  630.  
  631.  
  632. ------------------------------
  633.  
  634. Subject:  "newgroup" control messages aren't being executed
  635.  
  636. > "newgroup" control messages aren't be executed
  637.  
  638. The usual blame for this is _PATH_EGREP points to a grep that doesn't
  639. understand regular expressions.  For example, GNU grep only understands
  640. regular expressions if it is called "egrep" (i.e. not "gnuegrep" or
  641. "egnugrep").
  642.  
  643. Make sure you have a link or symlink between egnugrep and egrep.  You
  644. then need to modify config.data so that _PATH_EGREP is
  645. /your/local/path/egrep and NOT /your/local/path/egnuegrep.  Then
  646. recompile and "make install" to have the new binaries and shell
  647. scripts installed.
  648.  
  649.  
  650. =====================================================================
  651.         HOW DO I... (Big changes you can make to the system)
  652. =====================================================================
  653.  
  654. ------------------------------
  655.  
  656. Subject:  How do I set up a delayed IHAVE/SENDME over NNTP?
  657.  
  658. Christophe Wolfhugel <Christophe.Wolfhugel@grasp.insa-lyon.fr> writes:
  659.  
  660. INN now allows to generate a timestamp entry in the batchfiles or to
  661. the channels/exploders (Wt in newsfeeds) which can be used to allow (for
  662. example) delayed ihave/sendme processing.  INN's senders (like innxmit)
  663. do not use that data yet.
  664.  
  665. Christophe.Wolfhugel@grasp.insa-lyon.fr has written a small patch for
  666. nntplink 3.1.0 which supports this.  The patch is available via
  667. anonymous FTP on grasp.insa-lyon.fr in the file
  668. "pub/unix/news/nntp/nntplink/delayed-1.0.pch".
  669.  
  670. The patch has been incorporated into nntplink 3.2, available from the
  671. nntplink distribution site, shape.mps.ohio-state.edu in the file
  672. /pub/nntplink/3.2pl1.tar.gz.  nntplink 3.3 is due out soon.
  673.  
  674.  
  675. HOW TO DO IT:
  676.  
  677. The syntax that you would use in your newsfeeds file would be:
  678.  
  679.     site:*:Tf,Wnmt:
  680.  
  681. and run this command now and then:
  682.  
  683.     nntplink -i batchfile -y 300 -b site news.site.fr
  684.  
  685. The delayed IHAVE/SENDME is expected to allow bandwidth savings in
  686. situations where all sites use nntplink in following topology:
  687.  
  688.     Your site -- 64k -----------+-----------  Site 1
  689.                                 |               |
  690.                                 |              2mb
  691.                                 |               |
  692.                                 +------------ Site 2
  693.  
  694.    Site 1 and 2 are in the same metropolitan area, you feed them both.
  695.    With the standard nntplink layout, you generally send all articles
  696.    twice, which is a waste even if you're at 2 Meg/s link and even if
  697.    Site 1 and 2 do nntplinks, you're faster.
  698.  
  699.    The delayed link would be used between your site and Site 2.  A 2 or
  700.    3 minute delay allows Site 1 to feed Site 2 before you, and in case
  701.    of a Site 1 outage the backup starts nearly immediately.
  702.  
  703.    Reasonnable delays are still kept as You -> 1 -> 2 should take less
  704.    than one minute (or just 300 ms disk to disk if using nntplink -i ? :)).
  705.  
  706. Experiences seem to show that a 2 to 3 minutes delay is
  707. a reasonable choice.
  708.  
  709. Chris
  710.  
  711. ------------------------------
  712.  
  713. Subject:  Can I use gzip with INN?
  714.  
  715. (this was written with the help of Michael Brouwer <michael@tar.wft.stack.urc.tue.nl>)
  716.  
  717. There are three things that can be effected by using gzip:  Compression
  718. of old logs, compressing batches to send out, and decompressing batches
  719. that come in.
  720.  
  721. With INN 1.4 all you need to do is change two lines in config.data to
  722. something like this:
  723.  
  724. COMPRESS                /usr/local/bin/gzip
  725. DOTZ                    .gz
  726.  
  727. If you rebuild INN with these options set, all logs will be gzipped, and rnews
  728. will use gzip to decompress news.
  729.  
  730. gzip will automaticly and transparently decompress UNIX Compress, SCO
  731. UNIX Compress (I'm told it's 99% compatible with UNIX Compress), Pack,
  732. and gzip.  Therefore, you can now receive batches compressed with any
  733. of the above listed formats.  Let's say your site is now has "a
  734. universal decompresser".
  735.  
  736. It has been reported that if you hardlink gzip to be zcat, and make
  737. sure that it is the zcat that INN uses, you can get the "universal
  738. decompresser" without having to use gzip for your logs.  (Though, gzip
  739. for your logs is a big win, so why make trouble for yourself?)
  740.  
  741. `send-uucp' will still use compress for outgoing batches, so the sites
  742. you feed won't suddenly start getting data they don't understand.
  743.  
  744. Before you can send gzipped batches, you should make sure that the
  745. sites that you feed have made the above changes so that they have the
  746. "universal decompresser" too.
  747.  
  748. Edit send-uucp to use gzip instead of compress for certain hosts (see
  749. example of using compress -b12 for the host esac in send-uucp),
  750. outgoing batches will be gzipped.
  751.  
  752. If you use sendbatch, you will have to edit the file so that COMPRESS
  753. is set to "gzip" and COMPFLAGS is set to "-9vc".
  754.  
  755.  
  756. ------------------------------
  757.  
  758. Subject:  What do I do if /var/spool/news is set up over many partitions?
  759.  
  760. First of all, you can do this by either mounting a filesystem at
  761. /var/spool/news/comp (for example) or by mounting a filesystem anywhere
  762. and making /var/spool/news/comp a symbolic link to the new partition.
  763.  
  764. Articles will be written as normal, but cross-posts have to be handled
  765. specially now.  Usually INN handles crossposts by writing the article
  766. to the first newssgroup, and then creating hard links to all the other
  767. places where the article should appear.  Hard links do not take up
  768. additional disk space (except making your directories longer).  Hard
  769. links also have the advantage that the file data doesn't get deleted
  770. until the last hard link is gone (and they can be deleted in any
  771. order).  Therefore, you can expire each newsgroup at a different rate,
  772. but the file data won't delete until it is expired from the last
  773. newsgroup.
  774.  
  775. The problem is that two hard linked files must both be on the same
  776. filesystem (partition).
  777.  
  778. When INN sees that it can not make a hard link (because an article is
  779. cross-posted across two partitions) it will try to make a symbolic
  780. link.  If your system can not do symbolic links, set HAVE_SYMLINKS to
  781. DONT in your config.data file.  This will make INN write a second
  782. (or third, etc.) copy of the file instead.  (NOTE: INN 1.4 doesn't
  783. make the extra files.  This feature is planned for INN 1.5.)
  784.  
  785. Anyway, even though INN will automatically create symbolic links, you
  786. have to give expire the "-l" flag so that it will know to modify its
  787. behavior.  Suppose that a message is posted to rec.photo and
  788. alt.cameras and suppose that rec.photo expires more quickly then the
  789. alt group.  If this happens, then you will be left with a dangling
  790. symlink.  The -l flag prevents this from happening by not removing
  791. the file from rec.photos until alt.cameras expire time permits it
  792. from being deleted.
  793.  
  794. To inform expire that your spool is split across multiple partitions:
  795.  
  796. In news.daily, change:
  797.     EXPIREFLAGS="-v1"
  798. to read
  799.     EXPIREFLAGS="-v1 -l"
  800.  
  801. In expirerm, change:
  802.     RMPROC="fastrm -e -u -s ${SPOOL}"
  803. to read
  804.     RMPROC="fastrm -e -s ${SPOOL}"
  805.  
  806. Now edit innwatch.ctl so that it checks all the spool disks, not just
  807. ".".  See the lines with "No space (spool)".
  808.  
  809. Lastly, edit innstat (the line with the "df") so that all spool disks
  810. are included.  After that, you're done!
  811.  
  812. If you ever need to run "makehistory" you should pay attention to this
  813. caveat in makehistory(8):
  814.  
  815.     Makehistory does not handle symbolic links.  If the news
  816.     spool area is split across multiple partitions, the follow-
  817.     ing commands should probably be run before the database is
  818.     regenerated:
  819.         cd /usr/spool/news
  820.         find . -type l -print | xargs -t rm
  821.  
  822. However, if /var/spool/news/comp was a symlink to the partition
  823. that comp is really on, you'll have to reinstall that link.  You
  824. have avoid this by changing the above commands to:
  825.         cd /usr/spool/news
  826.         find . -type l -print | grep '[0-9][0-9]*' | xargs -t rm
  827.  
  828.  
  829. ------------------------------
  830.  
  831. Subject:  Archiving expired articles
  832.  
  833. In <2hmomh$262@news.iastate.edu> rod@iastate.edu writes:
  834. >What options do I have in INN for archiving local newsgroups?
  835.  
  836. See doc/archive.8.  You could also put "never:never:never" in your
  837. expire.ctl file.
  838.  
  839. >Any help would be appreciated. Any cookbook examples would also help.
  840.  
  841. A cookbook newsfeeds entry:
  842.     # Feed all moderated source postings to an archiver
  843.     source-archive!:!*,*sources*,!*wanted*,!*.d\
  844.         :Tc,Nm,Wn:/usr/local/bin/archive -f -i /usr/spool/news.archive/INDEX
  845.  
  846. Ulf Kieber <uk1@irz.inf.tu-dresden.de> writes:
  847. People often complain that the man pages for archive and for newsfeeds
  848. do give conflicting information.  This is not true.  Newsfeeds(5) shows
  849. you how to set up a /program/ feed for archive, while archive(8) shows
  850. you how to set up a /channel/ feed.  There are some rules for using one
  851. over the other:
  852.  
  853. 1. If you intend to use the ``-i'' flag, ALWAYS use a channel feed, as
  854.    archive does not do any file locking on it's index file.  The index
  855.    file might get corruped by multiple concurrently running instances
  856.    of archive, as may happen with a program feed.
  857.  
  858. 2. If you do not intend to use the ``-i'' flag, choose a channel feed
  859.    only if that feed will be very busy (some hundred articles a day,
  860.    perhaps).  If the feed will not be really busy use a program feed.
  861.  
  862. A channel feed starts up a process that keeps running all the time and
  863. is connected to innd via a pipe, while a program feed fires up a
  864. process for every single article that goes through the feed.  That
  865. process only handles this one article and dies thereafter.
  866.  
  867.  
  868. ------------------------------
  869.  
  870. Subject:  INN on one machine, UUCP modem on a different one
  871.  
  872. Say you have a machine named "newsy" and "modemhead".  Newsy runs INN
  873. but only modemhead has any modems.
  874.  
  875. Receiving batches on modemhead:  Copy /bin/rnews and
  876. /usr/lib/news/inn.conf to modemhead.  It will work like magic.  When
  877. /bin/rnews runs, it will see that it isn't running on newsy and open an
  878. NNTP connection to newsy and feed the batch (one article at a time) to
  879. newsy... newsy thinks it's just getting a regular NNTP feed.  (which
  880. means modemhead has to be listed in hosts.nntp).
  881.  
  882. Sending batches via modemhead:  The "sendbatch" program calls $(UUX).
  883. Change ${UUX} to be defined like "rsh modemhead uux" instead of "uux".
  884. You'll have to do a little hacking on sendbatch.  For example, the part
  885. that checks to see if the queue is full might have to be re-written.
  886. Anyway... now the batches will be generated and send via modemhead's
  887. UUCP system.
  888.  
  889. Pretty neat, eh?
  890.  
  891.  
  892. Other advice:
  893.  
  894. I set UUX to 'rsh uucphost uux' (note no pipe [|]).
  895. Also, we have no 'uuq' command, but even if we did, it would have
  896.     returned bogus info as $SITE is not known to UUCP on newshost.
  897.     Thus I created a stupid 'uuq' that does 'echo 0 0 0 0 0 0 0'
  898.     to satisfy the awk script.  However, we have no way to monitor
  899.     queue length (tho its of little importance to us as we only have
  900.     3 feeds and they are partial)
  901. Finally, the /etc/passwd entry for 'news' on 'uucphost' MUST list /bin/sh;
  902.     /bin/csh results in 'rnews: event not found' and escaping the '!'
  903.     inside sendbatch had no effect.
  904.  
  905.  
  906. ------------------------------
  907.  
  908. Subject:  How do I set up inpaths with INN?
  909.  
  910. inpaths should work just fine with INN as it ships.  However, you can
  911. make it run faster by using the following shell script.  Edit it to
  912. your tastes.  It replaces the long "(cd /var/spool/news ;
  913. /usr/local/bin/gfind . -type f -print | /usr/lib/news/local/inpaths sdl
  914. | /usr/ucb/mail admin,pathsurvey@decwrl.dec.com )" which people usually
  915. use.
  916.  
  917. #!/bin/sh
  918. . /usr/lib/news/innshellvars
  919. cd ${SPOOL}
  920. awk '(NF > 2){print $3}' < ${HISTORY} | tr . / | sort | \
  921. inpaths `innconfval pathhost` | \
  922. ${MAILCMD} newsmaster,pathsurvey@decwrl.dec.com
  923.  
  924. If the inpaths people would include this information in the
  925. README, I could delete it from this FAQ.
  926.  
  927.  
  928. =====================================================================
  929.                            INFO ABOUT 1.5
  930. =====================================================================
  931.  
  932. INN 1.5 hasn't been released yet.  However, people constantly mis-type
  933. "INN 1.5" when they mean "INN 1.4".  The bug is in the human posting
  934. the message, not the software.
  935.  
  936. Release date for 1.5:  Unknown by even the author.
  937.  
  938. New features in 1.5:
  939.  
  940. 1)  Fix memory leaks in makehistory, thereby speeding it up.
  941.  
  942. 2)  Posting always allowed, even when server is throttled.
  943.  
  944. 3)  Operating systems that require HAVE_UNIX_DOMAIN set to DONT won't
  945.     be so, uh, handicaped.
  946.  
  947. 4)  A global killfile controlled by a function you write in TCL.
  948.     (Start learning TCL now if you want to stay totally hip.)
  949.  
  950. 5)  More interesting ways to control access to nnrpd.
  951.  
  952. 6)  More support for systems that don't have symbolic links.
  953.  
  954. 7)  Free beer.
  955.  
  956. 8)  Just kidding about #6.
  957.  
  958. None of these features prevent you from having a happy,
  959. healthy and productive life with INN 1.4sec.
  960.  
  961. DO NOT ASK RICH ABOUT 1.5.  IT WILL BE RELEASED WHEN IT IS DONE, NOT
  962. WHEN SUFFICIENT NUMBERS OF PEOPLE HAVE ASKED WHEN IT WILL BE FINISHED.
  963. Post to news.software.nntp if you have questions about features.
  964.  
  965.  
  966. =====================================================================
  967.                              BUGS IN 1.4
  968. =====================================================================
  969.  
  970. UNOFFICIAL patches for INN 1.4 are available via anonymous FTP at
  971. ftp://ftp.pop.psu.edu/pub/src/news/inn-patches/
  972.  
  973. The file ftp://ftp.pop.psu.edu/pub/src/news/inn-patches/README describes
  974. each of the UNOFFICIAL patches.
  975.  
  976. The ones that are highly recommended are:
  977.  
  978. 1.4-to-1.4sec     -- Fixes the major security hole in INN.
  979. 1.4sec-to-1.4sec2 -- Fixes the remaining known security hole in INN.
  980. select-loop-bug.patch -- Under some circumstances innd can lose track
  981.         of a file descriptor and end up sitting in a select()
  982.         loop.  If your INN suddenly is using up tons of CPU
  983.         time and not getting much done, install this UNOFFICIAL
  984.         patch.  Some OSs are more susecptible to this bug.
  985.  
  986. There is a replacement for innwatch that is written in Perl.  Get it from
  987. "ftp://ftp.univ-lyon1.fr/pub/unix/news/inn/contrib/innwatch-beta2.pl.gz".
  988. This directory is mirrored on ftp://ftp.pop.psu.edu/pub/src/news/inn/contrib
  989.  
  990.  
  991. =====================================================================
  992.                              BUGS IN 1.3
  993. =====================================================================
  994.  
  995.  
  996. ------------------------------
  997.  
  998. Subject:  7-bit encoded batches are not correctly processed. Why is this?
  999.  
  1000. Chris Schmidt <cs@germany.eu.net> replies:
  1001.  
  1002. The decode program that comes with INN up to version 1.3 is broken.
  1003. Because of that the last article in a 7bit encoded batch will not
  1004. correctly be decoded (the last characters are screwed up).  This is
  1005. fixed in INN 1.4.
  1006.  
  1007.  
  1008. ------------------------------
  1009.  
  1010. Subject:  NOV (overchan) doesn't work well.
  1011.  
  1012. Correct.  The NOV support in 1.3 didn't have all the bugs worked out.
  1013. Don't use NOV under INN 1.3.  Better yet, upgrade to 1.4sec and get all
  1014. the benefits!
  1015.  
  1016.  
  1017. =====================================================================
  1018.                              BUGS IN 1.2
  1019.                  (Hey, it's 1994!  Upgrade already!)
  1020. =====================================================================
  1021.  
  1022. ------------------------------
  1023.  
  1024. Subject:  Why doesn't nntpget work?
  1025.  
  1026. The nntpget in INN 1.2 doesn't work.  Period.  Upgrade to the latest
  1027. version of INN.
  1028.  
  1029.  
  1030. -- 
  1031.     Tom Limoncelli -- tal@warren.mentorg.com (work) -- tal@plts.org (play)
  1032.  
  1033.                    The internet is like a box of chocolates.
  1034.  
  1035.  
  1036.